home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / emacs16d.zip / _REGISTE.MIN < prev    next >
Text File  |  1991-07-19  |  2KB  |  105 lines

  1.  
  2.  
  3.  
  4. Name:F:copy-to-register
  5. [*]#(Fget-register,Copy to register,(
  6.     #(Ffree-register,#(reg.ARG1))
  7.     #(ds,reg.ARG1,T(,)##(go,reg.marks))
  8.     #(Fkill-to-buffer-one,#(bc,#(Fsecond,#(reg.ARG1))),#(Fmark),new)
  9. ))[*]
  10.  
  11.  
  12. Name:F:insert-register
  13. Also handle rectangles [tho].
  14. [*]#(Fget-register,Register to insert,(
  15.     #(Fcase,#(Ffirst,#(reg.ARG1)),
  16.         (T,(
  17.             #(Fun-kill-from-buffer-one,##(bc,#(Fsecond,#(reg.ARG1))))
  18.         )),
  19.         (R,(
  20.             #(Finsert-rectangle,#(Fsecond,#(reg.ARG1)))
  21.         )),
  22.         (
  23.             #(Ferror,Register ARG1 is not valid in this context)
  24.         )
  25.     )
  26. ))[*]
  27.  
  28.  
  29. Name:F:point-to-register
  30. [*]#(Fget-register,Point to register,(
  31.     #(Ffree-register,#(reg.ARG1))
  32.     #(ds,reg.ARG1,P(,)##(go,buffer-marks.##(ba,-1))(,)##(ba,-1))
  33.     #(sm,#(Fsecond,#(reg.ARG1)))
  34. ))[*]
  35.  
  36.  
  37. Name:F:register-to-point
  38. [*]#(Fget-register,Register to point,(
  39.     #(==,#(Ffirst,#(reg.ARG1)),P,(
  40.         #(==,##(ba,-1),#(Fthird,#(reg.ARG1)),,(
  41.             #(..,##(ba,#(Fthird,#(reg.ARG1))))
  42.             #(Fenter-local-modes)
  43.         ))
  44.         #(sp,#(Fsecond,#(reg.ARG1)))
  45.     ),(
  46.         #(Ferror,Register ARG1 is not valid in this context)
  47.     ))
  48. ))[*]
  49.  
  50.  
  51. Name:F:view-register
  52. [*]#(Fget-register,View what register,(
  53.     #(an,##(reg.ARG1))
  54.     #(Fcase,#(Ffirst,#(reg.ARG1)),
  55.         (T,(
  56.             #(Fview-register,#(Fsecond,#(reg.ARG1)))
  57.         )),
  58.         (R,(
  59.             #(Fview-register,#(Fsecond,#(reg.ARG1)))
  60.         )),(
  61.             #(Ferror,Register ARG1 is not valid in this context)
  62.         )
  63.     )
  64. ))[*]
  65.  
  66.  
  67. Name:Ffree-register
  68. Free up any resources required by a register other than its contents.
  69. Enter with the arguments set to the contents of the mark.
  70. [*]#(Fcase,arg1),
  71.     (T,(
  72.         #(ds,reg.marks,arg2##(reg.marks))
  73.     )),
  74.     (P,(
  75.         #(ds,buffer-marks.##(ba,-1),arg2##(buffer-marks.##(ba,-1)))
  76.     )),
  77.     (default)
  78. )[*]
  79.  
  80.  
  81. Name:Fget-register
  82. Called with
  83. arg1 = prompt
  84. arg2 = code to execute using Fr with ARG1 = the register.
  85. #(Fget-register,Register,(#(an,Register ARG1)))
  86. [*]#(an,arg1? )
  87. #(ds,temp,#(g))
  88. #(an)
  89. #(==,##(temp),C-g,(
  90.     #(bl)
  91.     #(Fmessage,Quit)
  92. ),(
  93.     #(Fr,(arg2),##(temp))
  94. ))[*]
  95.  
  96.  
  97. Name:Fview-register
  98. [*]#(ds,old-buffer,##(ba,-1))
  99. ##(ba,1,a)
  100. #(sp,arg1>)
  101. #(ow,##(rm,##(bc,##(++,##(bc,arg1),1),d,a))(
  102. ))
  103. ##(ba,##(old-buffer))
  104. #(Fhit-any-key)
  105. [*]